// pages/cat_mse_look/cat_ster.js
const app = getApp()
var that
Page({
  data: {
    cat_id: "",
    ster_class:"1"
  },

  onLoad: function (options) {
    that = this
    that.setData({ cat_id: options.id });
    if (options.ster == "否") {
      that.setData({ ster_class: 2 });
    }
  },

  onReady: function () {
  
  },

  onShow: function () {
  
  },
  select_ster:function(e){
    if (e.currentTarget.dataset.type=="否"){
      that.setData({ ster_class: 2 });
    } else { that.setData({ ster_class: 1 });}
  },
  next:function(){//点击完成
    
    app.update_cat_msg("ster_status", that.data.ster_class, that.data.cat_id);
    wx.navigateBack({//返回上一级
      delta: 1
    })
  }
})